import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //  登录状态
      isLogin:false,
    //  用户信息
      userMessage:{
        nickname:"登录/注册"
      },
  },
  mutations: {
    newMessage(state,payload){
      state.userMessage=payload
    },
      updataLogin(state,payload){
        state.isLogin=payload
      }

  },
  actions: {
    // changeMessage(context,payload){
    //   context.commit("newMessage",payload)
    // },

  },
  modules: {
  }
})
